package com.base.app_core.model;

import com.litesuits.orm.db.annotation.Mapping;
import com.litesuits.orm.db.annotation.PrimaryKey;
import com.litesuits.orm.db.annotation.Table;
import com.litesuits.orm.db.enums.AssignType;
import com.litesuits.orm.db.enums.Relation;

/**
 * Created by Administrator on 29/03/2018.
 */

@Table("poilist")
public class PoiList {


    /**
     * id : 3206819982379827859
     * title : 泉州森林公园
     * address : 福建省泉州市丰泽区通港路
     * tel : 0595-22052063
     * category : 旅游景点:公园
     * type : 0
     * location : {"lat":24.88661,"lng":118.65972}
     * _distance : 0.0
     * ad_info : {"adcode":350503,"province":"福建省","city":"泉州市","district":"丰泽区"}
     */
    @PrimaryKey(AssignType.BY_MYSELF)
    private String id;
    private String title;
    private String address;
    private String tel;
    private String category;
    private int type;
    @Mapping(Relation.OneToOne)
    private LocationBean location;
    private double _distance;
    @Mapping(Relation.OneToOne)
    private AdInfoBean ad_info;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public String getTel() {
        return tel;
    }

    public void setTel(String tel) {
        this.tel = tel;
    }

    public String getCategory() {
        return category;
    }

    public void setCategory(String category) {
        this.category = category;
    }

    public int getType() {
        return type;
    }

    public void setType(int type) {
        this.type = type;
    }

    public LocationBean getLocation() {
        return location;
    }

    public void setLocation(LocationBean location) {
        this.location = location;
    }

    public double get_distance() {
        return _distance;
    }

    public void set_distance(double _distance) {
        this._distance = _distance;
    }

    public AdInfoBean getAd_info() {
        return ad_info;
    }

    public void setAd_info(AdInfoBean ad_info) {
        this.ad_info = ad_info;
    }


    @Table("locationb")
    public static class LocationBean {
        /**
         * lat : 24.88661
         * lng : 118.65972
         */

        @PrimaryKey(AssignType.AUTO_INCREMENT)
        private long id;
        private double lat;
        private double lng;

        public long getId() {
            return id;
        }

        public void setId(long id) {
            this.id = id;
        }

        public double getLat() {
            return lat;
        }

        public void setLat(double lat) {
            this.lat = lat;
        }

        public double getLng() {
            return lng;
        }

        public void setLng(double lng) {
            this.lng = lng;
        }
    }

    @Table("adInfob")
    public static class AdInfoBean {
        /**
         * adcode : 350503
         * province : 福建省
         * city : 泉州市
         * district : 丰泽区
         */

        @PrimaryKey(AssignType.AUTO_INCREMENT)
        private long id;
        private int adcode;
        private String province;
        private String city;
        private String district;

        public long getId() {
            return id;
        }

        public void setId(long id) {
            this.id = id;
        }

        public int getAdcode() {
            return adcode;
        }

        public void setAdcode(int adcode) {
            this.adcode = adcode;
        }

        public String getProvince() {
            return province;
        }

        public void setProvince(String province) {
            this.province = province;
        }

        public String getCity() {
            return city;
        }

        public void setCity(String city) {
            this.city = city;
        }

        public String getDistrict() {
            return district;
        }

        public void setDistrict(String district) {
            this.district = district;
        }
    }
}
